#include<stdio.h>
int main()
{
	double money ;
	double sum=0 ;
	scanf("%lf", &money);
	if (money < 100)
	{
		printf("%.2f",sum);
	}
	else if (money >= 100 && money < 200) 
	{
		sum = money * 0.95;
		printf("%.2f",sum);
	}
	else if (money >= 200 && money < 500)
	{
		sum = money * 0.9;
		printf("%.2f",sum);
	}
	else if (money >= 500 && money < 1000)
	{
		sum = money * 0.85;
		printf("%.2f",sum);
	}
	else if (money >= 1000)
	{
		sum = money * 0.8;
		printf("%.2f",sum);
	}

	return 0;
}